import request from '@/utils/request'

// 查询列表
export function listInstallment(data) {
  return request({
    url: '/weishu-installment/installment/list',
    method: 'post',
    data: data
  })
}
// 初审核通过
export function firstSH(data) {
  return request({
    url: '/weishu-installment/installment/firstSH',
    method: 'get',
    params:{
      id: data.id,
      applyOrderNo: data.applyOrderNo,
    }
  })
}
// 复审核通过
export function secondSH(data) {
  return request({
    url: '/weishu-installment/installment/secondSH',
    method: 'get',
    params:{
      id: data.id,
      applyOrderNo: data.applyOrderNo,
    }
  })
}
// 初审核不通过
export function firstnoSH(data) {
  return request({
    url: '/weishu-installment/installment/firstnoSH',
    method: 'get',
    params:{
      id: data.id,
      applyOrderNo: data.applyOrderNo,
    }
  })
}
// 复审核不通过
export function secondnoSH(data) {
  return request({
    url: '/weishu-installment/installment/secondnoSH',
    method: 'get',
    params:{
      id: data.id,
      applyOrderNo: data.applyOrderNo,
    }
  })
}
export function SaveInstallMent(data) {
  return request({
    url: '/weishu-installment/installment/saverentinstallment',
    method: 'post',
    data:data
  })
}
export function searchRentInstall(data) {
  return request({
    url: '/weishu-installment/installment/searchRentInstall',
    method: 'post',
    data:data,
  })
}

export function listhouse(data) {
  return request({
    url: '/weishu-installment/shoufang/list',
    method: 'post',
    data: data
  })
}
export function listcontract(data) {
  return request({
    url: '/weishu-installment/contract/list',
    method: 'post',
    data: data
  })
}

export function listSfLoan(data) {
  return request({
    url: '/weishu-installment/shoufang/listSfLoan',
    method: 'get',
    params:{
      productId: data.productId,
      contractId: data.id,
      periods: data.periods,
      startDate: data.startDate,
      endDate: data.endDate,
      rate:data.rate,
      serviceFee:data.serviceFee,
      balance:data.balance,
      sxBalance:data.creditLine
    }
  })
}
export function save(data) {
  return request({
    url: '/weishu-installment/shoufang/save',
    method: 'post',
    data: data
  })
}
export function productByid(id) {
  return request({
    url: '/weishu-installment/product/productByid',
    method: 'get',
    params:{
      id:id
    }
  })
}

export function listproduct() {
  return request({
    url: '/weishu-installment/product/list',
    method: 'post',
  })
}

